package git.LengNanJun.day319.demo1;

public class Dog extends Animal {
    public String size;   //  大小

    public Dog(String name, String color, String type, int age, String size)
    {
        super(name, color, type, age);
        this.size = size;
    }
    @Override
    public void sleep() {
        System.out.println("呼呼大睡");
    }

    @Override
    public void eat() {
        System.out.println("吃骨头");
    }

    @Override
    public void cry() {
        System.out.println("汪汪汪");
    }

    public void protect(){
        System.out.println(super.name+"保护主人");
    }
}
